package com.auth.constant;

/**
 * 缓存常量
 *
 * @author jwb
 */
public class CacheConstants {

    /**
     * 验证码 redis 前缀
     */
    public static final String CAPTCHA_CODE_KEY = "captcha_code:";

    /**
     * token默认过期时间（秒）
     */
    public static final long DEFAULT_EXPIRATION = 3600;

    /**
     * 令牌自定义传输标识
     */
    public static final String AUTHORIZATION_HEADER = "authorization";

    /**
     * 用户令牌缓存前缀
     */
    public final static String USER_TOKEN_KEY = "access_token:";

    /**
     * 用户id缓存前缀
     */
    public final static String USER_KEY = "access_user:";

    /**
     * 参数管理 cache 前缀
     */
    public static final String SYS_CONFIG_KEY = "sys_config:";

    /**
     * 字典管理 cache 前缀
     */
    public static final String SYS_DICT_KEY = "sys_dict:";

    /**
     * 生成编号redis 前缀
     */
    public static final String NUM_PREFIX = "num:";

    /**
     * 用户ID字段
     */
    public static final String USER_ID = "userId";

    /**
     * 用户名字段
     */
    public static final String USER_NAME = "userName";

    /**
     * 终端字段
     */
    public static final String CLIENT = "client";

    /**
     * 过期时间字段
     */
    public static final String EXPIRE = "expire";

    /**
     *  内部调用http header key
     */
    public static final String FEIGN_HEAD = "feign";

}
